CC = gcc
INC = -I. -I./serial
LIB = -lpthread -lrt
OPC = -c
obj = $(patsubst %.c,%.o,$(wildcard *.c))

.c.o:
	$(CC) $(OPC) $(INC) $<

all:	$(obj) servidor.exe


servidor.exe: $(obj) serial.o
	gcc $^ $(LIB) -o $@

serial.o: serial/serial.c
	gcc $^ $(INC) -c

clean:
	rm -fr core servidor.exe *.o
